

#ifndef UC_GESPHERE_H
#define UC_GESPHERE_H

#include "zgegbl.h"
#include "zgepnt3d.h"
#include "zgevec3d.h"
#include "zgeintrvl.h"
#include "zgesurf.h"
#pragma pack (push, 8)

class UcGeCircArc3d;

class
GX_DLLEXPIMPORT
UcGeSphere : public UcGeSurface
{
public:
    UcGeSphere();
    UcGeSphere(double radius, const UcGePoint3d& center);
    UcGeSphere(double radius, const UcGePoint3d& center,
               const UcGeVector3d& northAxis, const UcGeVector3d& refAxis,
               double startAngleU, double endAngleU,
               double startAngleV, double endAngleV);
    UcGeSphere(const UcGeSphere& sphere);

    double         radius            () const;
    UcGePoint3d    center            () const;
    void           getAnglesInU      (double& start, double& end) const;
    void           getAnglesInV      (double& start, double& end) const;
    UcGeVector3d   northAxis         () const;
    UcGeVector3d   refAxis           () const;
    UcGePoint3d    northPole         () const;
    UcGePoint3d    southPole         () const;
    ZSoft::Boolean isOuterNormal     () const;
    ZSoft::Boolean isClosed       (const UcGeTol& tol = UcGeContext::gTol) const;

    UcGeSphere&    setRadius         (double);
    UcGeSphere&    setAnglesInU      (double start, double end);
    UcGeSphere&    setAnglesInV      (double start, double end);
    UcGeSphere&    set               (double radius, const UcGePoint3d& center);
    UcGeSphere&    set               (double radius, const UcGePoint3d& center,
                                      const UcGeVector3d& northAxis,
                                      const UcGeVector3d& refAxis,
                                      double startAngleU,
                                      double endAngleU,
                                      double startAngleV,
                                      double endAngleV);

    UcGeSphere&    operator =     (const UcGeSphere& sphere);

    ZSoft::Boolean intersectWith  (const UcGeLinearEnt3d&, int& intn,
                                   UcGePoint3d& p1, UcGePoint3d& p2,
                                   const UcGeTol& tol = UcGeContext::gTol) const;

	UcGeSphere& setrefAxis (UcGeVector3d val);		// INTERNAL USE ONLY
	UcGeSphere& setnorthAxis (UcGeVector3d val);	// INTERNAL USE ONLY

};

#pragma pack (pop)
#endif
